package com.vader.admin.controller;

import com.vader.admin.entity.Query.LoginQuery;
import com.vader.admin.service.SystemService;
import com.vader.common.entity.CommonResponse;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import javax.validation.Valid;

/**
 * @author Vader
 * @date 2021/10/10
 **/
@RestController
@RequestMapping("/system")
public class SystemController {

    @Resource
    private SystemService systemService;

    @PostMapping("/login")
    public CommonResponse<String> login(@RequestBody @Valid LoginQuery loginQuery) {
        return systemService.login(loginQuery);
    }
}
